#ifndef AUDIOSETTINGSDIALOG_H
#define AUDIOSETTINGSDIALOG_H

#include <QDialog>

#include "H_NES_CPP.h"

namespace Ui {
  class AudioSettingsDialog;
}




class AudioSettingsDialog:public QDialog{
    Q_OBJECT

  public:

    static int FindSampleRateIndex(int SampleRate);
    static H_NES_CPP::SampleRate GetSampleRateFromIndex(int Index);
    static int FindNumOfSampleBitIndex(int NumOfSampleBit);
    static int GetNumOfSampleBitFromIndex(int Index);

    explicit AudioSettingsDialog(void* mainWindow,QWidget* parent=nullptr);
    ~AudioSettingsDialog();

  protected:
    void closeEvent(QCloseEvent* event);
    
  private slots:
    void on_comboBox_SampleRate_currentIndexChanged(int index);

    void on_comboBox_NumOfSampleBit_currentIndexChanged(int index);

    void on_horizontalSlider_PulseDiff_valueChanged(int value);

  private:
    Ui::AudioSettingsDialog *ui;

    void* mainWindow;
    bool IsInit;

};




#endif // AUDIOSETTINGSDIALOG_H
